package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;
import java.util.List;

public class PlaylistEditEndpoint implements Sequenceable, Serializable {

    @SerializedName("playlistId")
    private String playlistId;

    @SerializedName("actions")
    private List<ActionsItem> actions;



    public static final Sequenceable.Producer<PlaylistEditEndpoint> CREATOR = new Producer<PlaylistEditEndpoint>() {
        @Override
        public PlaylistEditEndpoint createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            PlaylistEditEndpoint playlistEditEndpoint = new PlaylistEditEndpoint();
            playlistEditEndpoint.unmarshalling(parcel);
            return playlistEditEndpoint;
        }
    };



    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.playlistId);
        parcel.writeList(this.actions);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.playlistId=parcel.readString();
        this.actions = parcel.readSequenceableList(ActionsItem.class);
        return true;
    }

    @Override
    public String toString() {
        return "PlaylistEditEndpoint{" +
                "playlistId='" + playlistId + '\'' +
                ", actions=" + actions +
                '}';
    }

    public String getPlaylistId() {
        return playlistId;
    }

    public void setPlaylistId(String playlistId) {
        this.playlistId = playlistId;
    }

    public List<ActionsItem> getActions() {
        return actions;
    }

    public void setActions(List<ActionsItem> actions) {
        this.actions = actions;
    }
}
